<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
    xmlns:s="http://jboss.com/products/seam/taglib"
    xmlns:ui="http://java.sun.com/jsf/facelets"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:rich="http://richfaces.org/rich">
    
        <rich:panel>
		  <h:form>        	
        	<br/>
        	<rich:dataTable var="_chuvas" value="#{chuvaAction.listaDeChuvas}" id="listaChuvasEntity">
				
				<rich:column>
					<f:facet name="header">
		                <ui:include src="/layout/sort.xhtml">
		                        <ui:param name="propertyLabel" value="Ano"/>
	                    </ui:include>
	                </f:facet>
					<h:outputText value="#{_chuvas.ano}">
					</h:outputText>
				</rich:column>

				<rich:column>
					<f:facet name="header">
		                <ui:include src="/layout/sort.xhtml">
		                        <ui:param name="propertyLabel" value="Máxima"/>
	                    </ui:include>
	                </f:facet>
					<h:outputText id="txtMaxima" value="#{_chuvas.maximaDia}">
						<f:convertNumber maxFractionDigits="2" /> 
					</h:outputText>
				</rich:column>
				
				<rich:column>
					<f:facet name="header">
		                <ui:include src="/layout/sort.xhtml">
		                        <ui:param name="propertyLabel" value="Probabilidade"/>
	                    </ui:include>
	                </f:facet>
					<h:outputText id="campoProbabilidade" value="#{_chuvas.probabilidade}">
						<f:convertNumber maxFractionDigits="5" /> 
					</h:outputText>
				</rich:column>
				
				<rich:column>
					<f:facet name="header">
		                <ui:include src="/layout/sort.xhtml">
		                        <ui:param name="propertyLabel" value="Tempo de Recorrência"/>
	                    </ui:include>
	                </f:facet>
					<h:outputText id="campoTR" value="#{_chuvas.tempoRecorrencia}">
						<f:convertNumber maxFractionDigits="3" /> 
					</h:outputText>
				</rich:column>
				
			</rich:dataTable>
			</h:form>
		</rich:panel>    
		
		<rich:jQuery selector="#listaChuvasEntity tr:odd" query="addClass('odd-row')" />
        <rich:jQuery selector="#listaChuvasEntity tr:even" query="addClass('even-row')" />
        <rich:jQuery selector="#listaChuvasEntity tr" 
            query="mouseover(function(){jQuery(this).addClass('active-row')})"/>
        <rich:jQuery selector="#listaChuvasEntity tr" 
            query="mouseout(function(){jQuery(this).removeClass('active-row')})"/>
</ui:composition>    